package com.blog.common.domain.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 网站访问量
 * </p>
 *
 * @author Valerie
 * @since 2023-03-11
 */
@TableName("tb_unique_view")
@ApiModel(value = "UniqueView对象", description = "网站访问量")
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class UniqueView implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;

    @ApiModelProperty("访问次数")
    @TableField("views_count")
    private Long viewsCount;

    @ApiModelProperty("ip")
    @TableField("ip")
    private String ip;

    @ApiModelProperty("地址")
    @TableField("address")
    private String address;

    @ApiModelProperty("设备")
    @TableField("user_agent")
    private String userAgent;

    @ApiModelProperty("创建时间")
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @ApiModelProperty("更新时间")
    @TableField(value = "update_time", fill = FieldFill.UPDATE)
    private LocalDateTime updateTime;

    @ApiModelProperty("1 删除 0 未删除")
    @TableField("is_delete")
    @TableLogic
    private Integer isDelete;
}
